package com.shlh.saas.service;

import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface OutlookOAuthService {

    public Map<String, Object> startDeviceCode(String tenantId, String clientId);

    public Map<String, Object> pollDeviceToken(String tenantId, String clientId, String deviceCode);

    public Map<String, Object> refreshToken(String tenantId, String clientId, String refreshToken);

    public boolean testGraphConnection(String email, String clientId, String tenantId, String clientSecret, String redirectUri);

    public LocalDateTime toExpiry(int expiresInSeconds);

    public boolean getMe(String accessToken);

    public boolean sendMailViaGraph(String accessToken, String fromEmail, String subject, String htmlContent, String toEmail);

    public boolean sendMailViaGraph(String accessToken, String fromEmail, String subject, String htmlContent, String toEmail, List<Map<String, Object>> attachments);

    boolean sendEmailInfo(String email, String clientId, String clientSecret, String tenantId, String subject, String content, String to);


    boolean sendEmailInfoWithAttachments( String email, String clientId, String clientSecret, String tenantId, String subject, String content, String to, List<Map<String, Object>> graphAttachments);
}
